From: Jasper St. Pierre Date: Fri, 19 Jul 2013 11:14:33 +0000 (-0400) Subject: popupMenu: Fix popup menu layouts in RTL directions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3883 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=43661fff7639ae53cbbe20b8e02a9d6aae8ce3bf;p=gnome-shell.git popupMenu: Fix popup menu layouts in RTL directions The math for inverting RTL layouts (which was copy/pasted from ClutterBoxLayout) was incorrect for non-zero child offsets. https://bugzilla.gnome.org/show_bug.cgi?id=704542 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 8bd836c91..57d9b49e2 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -317,7 +317,7 @@ const PopupBaseMenuItem = new Lang.Class({ } if (direction == Clutter.TextDirection.RTL) - childBox.x1 = width - x - availWidth; + childBox.x1 = box.x1 + (box.x2 - x - availWidth); else childBox.x1 = x; childBox.x2 = childBox.x1 + availWidth;